
def shared1(tok):
    return tok.shared('r1',1,'k','r2',1,'x')
def shared2(tok):
    return tok.shared('r1',1,'k','r2',2,'x')
def shared3(tok):
    return tok.shared('r1',2,'k','r2',1,'x')
def shared4(tok):
    return tok.shared('r1',2,'k','r2',2,'x')
formula=((all('pG','shared1') or all('pG','shared2')) or (all('pG','shared3') or all('pG','shared4')))

def shared1(tok):
    return tok.shared('r1',1,'k','r2',1,'x')
def shared2(tok):
    return tok.shared('r1',1,'k','r2',2,'x')
def shared3(tok):
    return tok.shared('r1',2,'k','r2',1,'x')
def shared4(tok):
    return tok.shared('r1',2,'k','r2',2,'x')